﻿from Devices.Chiot.ChiotDeviceParser import ChiotDeviceParser

class MatterPlugParser(ChiotDeviceParser):
    def ParseFullStatus(msgValue, fullStatus):
        ret, strValue = ChiotDeviceParser.GetStrProperty(msgValue, "mac")
        if ret:
            fullStatus.mac = strValue

        ret, strValue = ChiotDeviceParser.GetStrProperty(msgValue, "firmwareVersion")
        if ret:
            fullStatus.firmwareVersion = strValue

        ret, strValue = ChiotDeviceParser.GetStrProperty(msgValue, "hardwareVersion")
        if ret:
            fullStatus.hardwareVersion = strValue

        ret, strValue = ChiotDeviceParser.GetStrProperty(msgValue, "protocol")
        if ret:
            fullStatus.protocol = strValue

        return True
